<template>
  <q-btn class="button-tag" color="primary" flat @click="open">
    <q-icon name="share" class="q-mr-xs"/> 分享
    <a-dialog v-model="opened" title="分享" icon="share">
      <a-share-dialog :title="title" :link="link"></a-share-dialog>
    </a-dialog>
  </q-btn>
</template>

<script>

    export default {
      name: 'aShare',
      props: {
        title: {
          type: String,
          required: true
        },
        link: {
          type: String,
          required: false
        }
      },
      data () {
        return {
          opened: false
        }
      },
      watch: {
      },
      methods: {
        open () {
          this.opened = true
        }
      }
    }
</script>

<style lang="stylus">
</style>
